//
//  NativeVapViewFactory.swift
//  vap_plugin
//
//  Created by sunc on 2024/5/28.
//

import Foundation
import Flutter
import UIKit

class NativeVapViewFactory: NSObject, FlutterPlatformViewFactory {
  
    var messenger: FlutterBinaryMessenger
    
    init(messenger: FlutterBinaryMessenger) {
        self.messenger = messenger
        super.init()
    }
    
    func create(withFrame frame: CGRect, viewIdentifier viewId: Int64, arguments args: Any?) -> FlutterPlatformView {
        return NativeVapView(withFrame:frame, viewID: viewId, args: args, messenger: messenger);
    }

    func createArgsCodec() -> FlutterMessageCodec & NSObjectProtocol {
          return FlutterStandardMessageCodec.sharedInstance()
    }
      
}
